package com.ujiuye.controller;

import com.ujiuye.service.DeleteService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet("/show/user")
public class DeteleServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String uid = req.getParameter("uid");
        System.out.println(uid);
        DeleteService deleteService = new DeleteService();
        boolean ds1 = deleteService.ds(uid);
        PrintWriter pw = resp.getWriter();
        if (ds1){
            pw.print("删除成功");
        }else {
            pw.print("删除失败");
        }
    }
}
